import BasicLayout from './components/layouts/BasicLayout'
import PageView  from './components/layouts/PageView'

export default [
    {
        path:'/',
        name:"index",
        meta: { title: '首页' },
        redirect: '/account',
        component:BasicLayout,
        children:[
            // 个人设置
            {
                path: '/account',
                name: 'account',
                component:PageView,
                meta: { title: '个人设置'},
                redirect: '/account/settings',
                children:[
                    {
                        path: '/account/settings',
                        name: 'settings',
                        component: () => import('./views/account/components/Index'),
                        meta: { title: '个人中心'},
                        redirect: '/account/settings/base',
                        // alwaysShow: true,
                            children: [
                                {
                                    path: '/account/settings/base',
                                    name: 'BaseSettings',
                                    component: () => import('./views/account/settings/BaseSetting'),
                                    meta: { title: '基本设置'}
                                },
                                {
                                    path: '/account/settings/security',
                                    name: 'SecuritySettings',
                                    component: () => import('./views/account/settings/Security'),
                                    meta: { title: '安全设置', hidden: true, keepAlive: true, permission: [ 'user' ] }
                                },
                                {
                                    path: '/account/settings/binding',
                                    name: 'BindingSettings',
                                    component: () => import('./views/account/settings/Binding'),
                                    meta: { title: '账户绑定', hidden: true, keepAlive: true, permission: [ 'user' ] }
                                },
                                {
                                path: '/account/settings/notification',
                                name: 'NotificationSettings',
                                component: () => import('./views/account/settings/Notification'),
                                meta: { title: '新消息通知', hidden: true, keepAlive: true, permission: [ 'user' ] }
                                }
                            ]
                        }
                    ]
            },

            // 团队管理
            {
                path:'/team',
                name:'team',
                meta:{title:'团队管理'},
                component:PageView,
                redirect:'/team/members',
                children:[
                    {
                        path:'/team/members',
                        name:'teamMembers',
                        meta:{title:'团队成员'},
                        component: () => import('./views/team/views/Members')
                    },
                    {
                        path:'/team/roles',
                        name:'teamRoles',
                        meta:{title:'团队角色'},
                        component: () => import('./views/team/views/Roles')
                    },
                    {
                        path:'/team/groups',
                        name:'teamGroups',
                        meta:{title:'团队群组'},
                        component: () => import('./views/team/views/Groups'),
                        children:[
                            {
                                path:'/team/groups/member',
                                name:'GroupMember',
                                meta:{title:'成员列表'},
                                component: () => import('./views/team/views/GroupMembers')
                            },
                            {
                                path:'/team/groups/relation',
                                name:'GroupRelation',
                                meta:{title:'成员关联'},
                                component: () => import('./views/team/views/GroupRelation')
                            }
                        ]
                    }
                ]
            },

            // 组织管理
            {
                path:'/org',
                name:'org',
                meta:{title:'组织管理'},
                redirect:'org/list',
                component:PageView,
                children:[
                    {
                        path:'/org/list',
                        name:'list',
                        meta:{title:'组织列表'},
                        component:() => import('./views/org/views/Org')
                    }
                ]
            }
        ]
    },
]